Steve Klabnik [Sat, 30 Jul 2016 18:09:51 +0000 (14:09 -0400)]
bump to newer semver version
bors [Fri, 29 Jul 2016 23:53:16 +0000 (16:53 -0700)]
Auto merge of #2921 - jonathandturner:bin_by_default, r=alexcrichton
Add --lib and status message for completion
This PR adds a --lib flag for creating a library with new/init. It also adds a status message for a successful completion.
Jonathan Turner [Fri, 29 Jul 2016 23:52:00 +0000 (16:52 -0700)]
Add tests for passing both --bin and --lib
Jonathan Turner [Fri, 29 Jul 2016 19:52:33 +0000 (12:52 -0700)]
Add --lib to init/new. Add status message for completed creation
bors [Thu, 28 Jul 2016 17:27:57 +0000 (10:27 -0700)]
Auto merge of #2927 - alexcrichton:fix-nightiles, r=alexcrichton
Add a sleep to a rebuilding test to fix nightlies
Just the standard issue with fs timestamps, OSX, etc.
Alex Crichton [Thu, 28 Jul 2016 17:26:32 +0000 (10:26 -0700)]
Add a sleep to a rebuilding test to fix nightlies
Just the standard issue with fs timestamps, OSX, etc.
bors [Wed, 27 Jul 2016 15:47:59 +0000 (08:47 -0700)]
Auto merge of #2924 - luser:error-removing-file, r=alexcrichton
Print a more useful error message when the target binary can't be removed
This happens sometimes on Windows if the target is still running, and right
now cargo prints a very cryptic message:
```
$ cargo build
Compiling sccache v0.1.0 (file:///C:/build/sccache2)
An unknown error occurred
```
With this patch we get a much more useful error:
```
$ ../cargo/target/debug/cargo build
Compiling sccache v0.1.0 (file:///C:/build/sccache2)
error: Could not remove file: c:\build\sccache2\target\debug\sccache.exe.
To learn more, run the command again with --verbose.
```
Ted Mielczarek [Wed, 27 Jul 2016 15:22:06 +0000 (11:22 -0400)]
Print a more useful error message when the target binary can't be removed.
This happens sometimes on Windows if the target is still running, and right
now cargo prints a very cryptic message:
```
$ cargo build
Compiling sccache v0.1.0 (file:///C:/build/sccache2)
An unknown error occurred
```
With this patch we get a much more useful error:
```
$ ../cargo/target/debug/cargo build
Compiling sccache v0.1.0 (file:///C:/build/sccache2)
error: Could not remove file: c:\build\sccache2\target\debug\sccache.exe.
To learn more, run the command again with --verbose.
```
bors [Wed, 27 Jul 2016 01:03:06 +0000 (18:03 -0700)]
Auto merge of #2919 - alexcrichton:workspace-rebuild, r=brson
Always build libraries into the same location
Previously Cargo would compile a library into a different location depending on
whether it was the "root crate" or not. In the ongoing saga of reducing Cargo's
reliance on the idea of a "root crate" this PR is the next step. With workspaces
the root crate of a compliation changes all the time, so the output needs to be
the same whether a crate is at the root or not.
Fixing this inconsistence in turn fixes bugs like #2855 and #2897 which arise
due to this discrepancy. Additionally, Cargo will no longer recompile a library
when it's used as a "root crate" or not.
This is fixed by taking a few steps:
* Everything is now compiled into the `deps` directory, regardless of whether
it's a root output or not.
* If a "root crate" is being compiled, then the relevant outputs are hard-linked
up one level to where they are today. This means that your binaries, dylibs,
staticlibs, etc, will all show up where they used to.
* The `-C metadata` flag is always omitted for path dependencies now. These
dependencies are always path dependencies and already all have unique crate
names. Additionally, they're the only crates in the DAG without metadata, so
there's no need to provide additional metadata. This in turn means that none
of the file names of the generated crates are mangled.
Closes #2855
Alex Crichton [Mon, 25 Jul 2016 20:27:06 +0000 (13:27 -0700)]
Always build libraries into the same location
Previously Cargo would compile a library into a different location depending on
whether it was the "root crate" or not. In the ongoing saga of reducing Cargo's
reliance on the idea of a "root crate" this PR is the next step. With workspaces
the root crate of a compliation changes all the time, so the output needs to be
the same whether a crate is at the root or not.
Fixing this inconsistence in turn fixes bugs like #2855 and #2897 which arise
due to this discrepancy. Additionally, Cargo will no longer recompile a library
when it's used as a "root crate" or not.
This is fixed by taking a few steps:
* Everything is now compiled into the `deps` directory, regardless of whether
it's a root output or not.
* If a "root crate" is being compiled, then the relevant outputs are hard-linked
up one level to where they are today. This means that your binaries, dylibs,
staticlibs, etc, will all show up where they used to.
* The `-C metadata` flag is always omitted for path dependencies now. These
dependencies are always path dependencies and already all have unique crate
names. Additionally, they're the only crates in the DAG without metadata, so
there's no need to provide additional metadata. This in turn means that none
of the file names of the generated crates are mangled.
Closes #2855
bors [Wed, 27 Jul 2016 00:20:08 +0000 (17:20 -0700)]
Auto merge of #2920 - alexcrichton:wut, r=brson
Improve file open error when packaging crates
Be sure to point to the file in question.
Closes #2914
Alex Crichton [Tue, 26 Jul 2016 19:55:10 +0000 (12:55 -0700)]
Improve file open error when packaging crates
Be sure to point to the file in question.
Closes #2914
bors [Tue, 26 Jul 2016 23:12:19 +0000 (16:12 -0700)]
Auto merge of #2918 - munyari:man-pages, r=alexcrichton
Add man pages for cargo subcommands
From #2789
- [x] fetch
- [x] login
- [x] metadata
- [x] pkgid
- [x] rustc
- [x] rustdoc
- [x] uninstall
- [x] version
- [x] yank
- [x] generate_lockfile
Panashe M. Fundira [Tue, 26 Jul 2016 15:42:27 +0000 (11:42 -0400)]
Add man page for pkgid subcommand
Panashe M. Fundira [Tue, 26 Jul 2016 02:08:42 +0000 (22:08 -0400)]
add man page for rustdoc subcommand
Panashe M. Fundira [Tue, 26 Jul 2016 01:46:59 +0000 (21:46 -0400)]
add man page for uninstall subcommand
Panashe M. Fundira [Tue, 26 Jul 2016 01:26:14 +0000 (21:26 -0400)]
add man page for generate-lockfile subcommand
Panashe M. Fundira [Tue, 26 Jul 2016 01:18:24 +0000 (21:18 -0400)]
add man page for version subcommand
Panashe M. Fundira [Tue, 26 Jul 2016 01:13:54 +0000 (21:13 -0400)]
add man page for metadata subcommand
Panashe M. Fundira [Tue, 26 Jul 2016 00:55:58 +0000 (20:55 -0400)]
Add man page for cargo login
bors [Tue, 26 Jul 2016 00:34:19 +0000 (17:34 -0700)]
Auto merge of #2917 - alexcrichton:cainfo, r=brson
Add `http.cainfo` config for custom certs
This adds a `http.cainfo` option to Cargo which reads CA information from a
bundle to pass through to the underlying SSL implementation. This should allow
configuration of Cargo in situations where the default certificate store doesn't
contain the relevant certificates, such as behind corporate proxies.
cc #1180
bors [Mon, 25 Jul 2016 23:32:33 +0000 (16:32 -0700)]
Auto merge of #2909 - jonathandturner:debug_release_at_bottom, r=alexcrichton
Switch to output release/debug after compile
This is similar to https://github.com/rust-lang/cargo/pull/2896 but instead of inline, it puts an indicator at the bottom showing if it was a release or debug build.
```
jturner-23759:cargo jturner$ ./target/release/cargo build
Finished debug (unoptimized + debuginfo) build.
jturner-23759:cargo jturner$ ./target/release/cargo build --release
Finished release (optimized) build.
```
Jonathan Turner [Mon, 25 Jul 2016 23:30:03 +0000 (16:30 -0700)]
Add 'Finished' line after compile finishes with compile timing and build type
Panashe M. Fundira [Mon, 25 Jul 2016 21:17:41 +0000 (17:17 -0400)]
Add rustc man page
Panashe M. Fundira [Mon, 25 Jul 2016 20:55:55 +0000 (16:55 -0400)]
Add man page for cargo yank
bors [Mon, 25 Jul 2016 20:32:25 +0000 (13:32 -0700)]
Auto merge of #2915 - matklad:rename-shell, r=alexcrichton
Minor, rename function parameter
Naming `Config` as `shell` (while having a `shell` function in scope which returns `MultiShell`) inside this not so trivial callback driven fragment of code is devilishly evil :)
Panashe M. Fundira [Mon, 25 Jul 2016 20:20:30 +0000 (16:20 -0400)]
Add cargo fetch man page
bors [Mon, 25 Jul 2016 19:51:47 +0000 (12:51 -0700)]
Auto merge of #2910 - BusyJay:master, r=alexcrichton
Fix python detection
Some platform, like ArchLinux, may not have python in the PATH, but can still have python2. So we should add some fallback option to detect python correctly. This detection order is copy from [rust-lang/rust](https://github.com/rust-lang/rust/blob/master/configure#L742).
Alex Crichton [Mon, 25 Jul 2016 18:53:42 +0000 (11:53 -0700)]
Add `http.cainfo` config for custom certs
This adds a `http.cainfo` option to Cargo which reads CA information from a
bundle to pass through to the underlying SSL implementation. This should allow
configuration of Cargo in situations where the default certificate store doesn't
contain the relevant certificates, such as behind corporate proxies.
cc #1180
bors [Mon, 25 Jul 2016 18:48:59 +0000 (11:48 -0700)]
Auto merge of #2913 - cuviper:disable-option-checking, r=alexcrichton
configure: Support --disable-option-checking
This is mirroring rust-lang/rust#31169. The RPM %configure macro sets a
lot of useful paths for typical configure scripts, but some of these
values are not recognized here in Cargo. It's nice to have an option to
ignore those, rather than failing on `validate_opt`.
Aleksey Kladov [Mon, 25 Jul 2016 06:44:28 +0000 (09:44 +0300)]
Minor, rename function parameter
bors [Mon, 25 Jul 2016 04:44:23 +0000 (21:44 -0700)]
Auto merge of #2912 - matklad:move-target-dir, r=alexcrichton
Move `target_dir` to Workspace and fix #2848
Target dir is now an API of Workspace. It is still initialized eagerly, just later.
I also had to errors in the config file when retrieving `verbose` and `color` config. Seems fishy, but is probably OK.
Josh Stone [Sun, 24 Jul 2016 23:28:21 +0000 (16:28 -0700)]
configure: Support --disable-option-checking
This is mirroring rust-lang/rust#31169. The RPM %configure macro sets a
lot of useful paths for typical configure scripts, but some of these
values are not recognized here in Cargo. It's nice to have an option to
ignore those, rather than failing on `validate_opt`.
Aleksey Kladov [Sun, 24 Jul 2016 18:16:21 +0000 (21:16 +0300)]
Fix config loading test
Aleksey Kladov [Sun, 24 Jul 2016 07:45:02 +0000 (10:45 +0300)]
Ignore some config errors during init
While it is generally terrible to silently ignore errors in the
configuration files, it is acceptable in this case. Verbosity and color
config have reasonable defaults, and we don't want to fail for simple
commands like `cargo --version` just because of the garbage in the
config file.
fixed #2848
Aleksey Kladov [Sun, 24 Jul 2016 07:29:10 +0000 (10:29 +0300)]
Read target config later
Jay Lee [Sat, 23 Jul 2016 21:01:18 +0000 (05:01 +0800)]
Fix python detection
Aleksey Kladov [Sat, 23 Jul 2016 01:51:09 +0000 (04:51 +0300)]
Move `target_dir` to workspace
bors [Fri, 22 Jul 2016 23:30:48 +0000 (16:30 -0700)]
Auto merge of #2908 - froydnj:spelling-fixes, r=alexcrichton
fix typos in src/doc/manifest.md
A few things I noticed while reading the documentation. The "sections" change is not strictly a spelling error, but I figured I would fix it while I was in the area.
Nathan Froyd [Sat, 23 Jul 2016 05:15:09 +0000 (01:15 -0400)]
fix typos in src/doc/manifest.md
bors [Fri, 22 Jul 2016 18:20:23 +0000 (11:20 -0700)]
Auto merge of #2907 - alexcrichton:alias-no-override, r=brson
Don't allow aliases to override builtin commands
Closes #2901
Alex Crichton [Fri, 22 Jul 2016 17:58:25 +0000 (10:58 -0700)]
Don't allow aliases to override builtin commands
Closes #2901
bors [Thu, 21 Jul 2016 17:29:14 +0000 (10:29 -0700)]
Auto merge of #2900 - matklad:lazy-config, r=alexcrichton
Lazy config
Next piece of #2848.
* `config.rustc` and `config.rustdoc` are now lazy.
* `Rustc` and not `config.rustc` now knows the path to the compiler.
* `LazyCell` is used to implement laziness
No new tests are added, because we need to lazify `target_path` to deal with broken cargo config.
`target_path` is a bit peculiar. It is always accessed as `ws.config.target_path(ws)`, and has a setter. Perhaps it belongs to the workspace? Will look into that later.
Aleksey Kladov [Wed, 20 Jul 2016 23:47:14 +0000 (02:47 +0300)]
Use LazyCell to implement lazy Config
Aleksey Kladov [Wed, 20 Jul 2016 22:25:46 +0000 (01:25 +0300)]
Coalesce config.rustc and config.rustc_info
Aleksey Kladov [Wed, 20 Jul 2016 21:23:12 +0000 (00:23 +0300)]
Move path to rustc into Rustc struct
Aleksey Kladov [Wed, 20 Jul 2016 21:08:58 +0000 (00:08 +0300)]
Scrape tools config lazily
bors [Tue, 19 Jul 2016 17:13:14 +0000 (10:13 -0700)]
Auto merge of #2811 - alexcrichton:network-is-error, r=brson
Add a flag to force network access to be an error
If a lock file is generated and some equivalent of `cargo fetch` is run then
Cargo shouldn't ever touch the network or modify `Cargo.lock` until any
`Cargo.toml` later changes, but this often wants to be asserted in some build
environments where it's a programmer error if Cargo attempts to access the
network.
The `--locked` flag added here will assert that `Cargo.lock` does not need to
change to proceed. That is, if `Cargo.lock` would be modified (as it
automatically is by default) this is turned into a hard error instead.
This `--frozen` will not only assert that `Cargo.lock` doesn't change (the same
behavior as `--locked`), but it will also will manually prevent Cargo from
touching the network by ensuring that all network requests return an error.
These flags can be used in environments where it is *expected* that no network
access happens (or no lockfile changes happen) because it has been pre-arranged
for Cargo to not happen. Examples of this include:
* CI for projects want to pass `--locked` to ensure that `Cargo.lock` is up to
date before changes are checked in.
* Environments with vendored dependencies want to pass `--frozen` as touching
the network indicates a programmer error that something wasn't vendored
correctly.
A crucial property of these two flags is that **they do not change the behavior
of Cargo**. They are simply assertions at a few locations in Cargo to ensure
that actions expected to not happen indeed don't happen. Some documentation has
also been added to this effect.
Closes #2111
bors [Tue, 19 Jul 2016 15:45:06 +0000 (08:45 -0700)]
Auto merge of #2893 - KasMA1990:patch-1, r=alexcrichton
Include reference to Rust code structuring
Hey guys, I'm proposing this little addition to the manifest. When I first started with Rust, I wanted to make a simple crate, so the "Getting Started" (and from there, the manifest) document on crates.io was a natural entry point for me. However, it would have helped getting over some headaches initially if the Cargo documentation had driven me into the relevant Rust documentation; in the beginning at least it wasn't clear to me where Cargo ended and Rust began, especially with modules.
I'm not sure if this should be in the actual manifest or in the "Getting Stated" doc, or if you want it there at all, but it's a quality-of-life thing that I think past-me would have appreciated at least :)
Kasper Møller Andersen [Tue, 19 Jul 2016 13:04:14 +0000 (15:04 +0200)]
Include reference to Rust code structuring
Alex Crichton [Tue, 28 Jun 2016 17:39:46 +0000 (10:39 -0700)]
Add flags to assert lock/cache behavior to Cargo
If a lock file is generated and some equivalent of `cargo fetch` is run then
Cargo shouldn't ever touch the network or modify `Cargo.lock` until any
`Cargo.toml` later changes, but this often wants to be asserted in some build
environments where it's a programmer error if Cargo attempts to access the
network.
The `--locked` flag added here will assert that `Cargo.lock` does not need to
change to proceed. That is, if `Cargo.lock` would be modified (as it
automatically is by default) this is turned into a hard error instead.
This `--frozen` will not only assert that `Cargo.lock` doesn't change (the same
behavior as `--locked`), but it will also will manually prevent Cargo from
touching the network by ensuring that all network requests return an error.
These flags can be used in environments where it is *expected* that no network
access happens (or no lockfile changes happen) because it has been pre-arranged
for Cargo to not happen. Examples of this include:
* CI for projects want to pass `--locked` to ensure that `Cargo.lock` is up to
date before changes are checked in.
* Environments with vendored dependencies want to pass `--frozen` as touching
the network indicates a programmer error that something wasn't vendored
correctly.
A crucial property of these two flags is that **they do not change the behavior
of Cargo**. They are simply assertions at a few locations in Cargo to ensure
that actions expected to not happen indeed don't happen. Some documentation has
also been added to this effect.
Closes #2111
bors [Mon, 18 Jul 2016 23:20:20 +0000 (16:20 -0700)]
Auto merge of #2891 - upsuper:fix-search-path, r=alexcrichton
Search dylib path from cargo before system
Cargo should have more knowledge about what it is looking for, and thus its paths should be more correct compared to system's. When there are conflicts, the search paths provided by the build system should take priority.
Xidorn Quan [Mon, 18 Jul 2016 07:25:22 +0000 (17:25 +1000)]
Search dylib path from cargo before system
Cargo should have more knowledge about what it is looking for, and thus
its paths should be more correct compared to system's. When there are
conflicts, the search paths provided by the build system should take
priority.
bors [Mon, 18 Jul 2016 05:25:52 +0000 (22:25 -0700)]
Auto merge of #2849 - wezm:publish_dry_run, r=alexcrichton
Add --dry-run to cargo publish
This PR picks up where @JustAPerson left off in https://github.com/rust-lang/cargo/pull/1699. I've updated their changes to apply to current master and added tests, including (I think) a test that checks that the upload doesn't actually occur.
The output is as it was before:

Closes https://github.com/rust-lang/cargo/issues/1332
bors [Mon, 18 Jul 2016 04:34:15 +0000 (21:34 -0700)]
Auto merge of #2889 - bennofs:fix-cargo-rustc-help, r=alexcrichton
fix help for cargo rustc -p
cargo rustc -p does the same as cargo build -p, so I just copied it from there.
Wesley Moore [Sun, 17 Jul 2016 23:43:57 +0000 (09:43 +1000)]
Add --dry-run option to publish sub-command
Squashed commit of the following:
commit
deed1d7b99c1cd142f7782d3b3b782d949e1f71f
Author: Wesley Moore <wes@wezm.net>
Date: Fri Jul 15 13:35:01 2016 +1000
Remove --dry-run and --no-verify mutual exclusion
commit
8a91fcf2a1aa3ba682fee67bb5b3e7c2c2cce8ef
Merge:
0c0d057 970535d
Author: Wesley Moore <wes@wezm.net>
Date: Fri Jul 15 13:30:38 2016 +1000
Merge remote-tracking branch 'upstream/master' into publish_dry_run
commit
0c0d0572533599b3c0e42797a6014edf480f1dc2
Author: Wesley Moore <wes@wezm.net>
Date: Tue Jul 12 08:03:15 2016 +1000
Improve grammar in --dry-run option
commit
a17c1bf6f41f016cafdcb8cfc58ccbe34d54fbb8
Author: Wesley Moore <wes@wezm.net>
Date: Mon Jul 11 14:17:41 2016 +1000
Add test for passing no-verify and dry-run to publish
commit
284810cca5df3268596f18700c0247de2f621c98
Author: Wesley Moore <wes@wezm.net>
Date: Mon Jul 11 14:51:38 2016 +1000
Add test for publish --dry-run
commit
8514e47fbce61c20b227815887a377c25d17d004
Merge:
2b061c5 ef07b81
Author: Wesley Moore <wes@wezm.net>
Date: Mon Jul 11 08:27:10 2016 +1000
Merge branch 'publish_dry_run' of github.com:JustAPerson/cargo into publish_dry_run
commit
ef07b81617df855328c34365b28049cd9742946c
Author: Jason Priest <jpriest128@gmail.com>
Date: Tue Jun 9 23:11:51 2015 -0500
Improve publish `--dry-run`
Catch a few more errors by aborting midway through transmit().
commit
0686fb0bf92a09bcbd41e15e23ff03a0763c5d08
Author: Jason Priest <jpriest128@gmail.com>
Date: Tue Jun 9 14:38:58 2015 -0500
Teach publish the `--dry-run` flag
Closes #1332
Benno Fünfstück [Sun, 17 Jul 2016 18:01:20 +0000 (20:01 +0200)]
fix help for cargo rustc -p
bors [Sun, 17 Jul 2016 17:58:10 +0000 (10:58 -0700)]
Auto merge of #2887 - wuranbo:doc-explain-doublebrackets, r=alexcrichton
doc: manifest.md add explain about double-bracket
Add TOML doc ref to explain double-bracket sections like [[bin]].
It really confused me when I saw the double-bracket first. I search google, take some time, and then saw the TOML doc, recall that we can have more than one executable in Cargo, understood it. So it can be added to help someone like me (:
吴冉波 [Sun, 17 Jul 2016 14:44:48 +0000 (22:44 +0800)]
doc: manifest.md add explain about double-bracket
bors [Sun, 17 Jul 2016 00:44:09 +0000 (17:44 -0700)]
Auto merge of #2885 - nelhage:ssh-retry-loop, r=alexcrichton
git: only attempt ssh-agent authentication once
This prevents infinite looping if ssh-agent authentication fails.
closes #2845
Nelson Elhage [Sat, 16 Jul 2016 22:33:58 +0000 (15:33 -0700)]
git: only attempt ssh-agent authentication once
This prevents infinite looping if ssh-agent authentication fails.
closes #2845
bors [Sat, 16 Jul 2016 16:41:31 +0000 (09:41 -0700)]
Auto merge of #2883 - wuranbo:patch-1, r=alexcrichton
doc: typo
吴冉波 [Sat, 16 Jul 2016 15:19:24 +0000 (23:19 +0800)]
doc: typo
bors [Fri, 15 Jul 2016 19:39:58 +0000 (12:39 -0700)]
Auto merge of #2881 - matklad:lazy-rustc-info, r=alexcrichton
Lazy rustc info
This is the first step towards https://github.com/rust-lang/cargo/issues/2848.
Aleksey Kladov [Fri, 15 Jul 2016 17:33:57 +0000 (20:33 +0300)]
Remove now unnecessary Rustc::blank method
Aleksey Kladov [Fri, 15 Jul 2016 17:14:34 +0000 (20:14 +0300)]
Retrieve Rustc info lazily
bors [Thu, 14 Jul 2016 21:59:03 +0000 (14:59 -0700)]
Auto merge of #2879 - QuiltOS:replace-bug, r=alexcrichton
Fix #2595 by skipping reflexive replacements
If you know of something better than `source_id == source_id`, I'd gladly change it.
John Ericson [Thu, 14 Jul 2016 19:08:00 +0000 (12:08 -0700)]
Merge branch 'master' into replace-bug
John Ericson [Thu, 14 Jul 2016 18:46:22 +0000 (11:46 -0700)]
Fix #2595 by skipping reflexive replacements
John Ericson [Thu, 14 Jul 2016 18:56:51 +0000 (11:56 -0700)]
Refactor replacement logic
John Ericson [Thu, 14 Jul 2016 08:44:31 +0000 (01:44 -0700)]
Add minimal version of #2595 to test suite (test currently fails)
bors [Thu, 14 Jul 2016 17:45:51 +0000 (10:45 -0700)]
Auto merge of #2876 - bennofs:fix-2851, r=alexcrichton
allow enabling features for deps with --features
Fixes #2851
Benno Fünfstück [Thu, 14 Jul 2016 13:06:29 +0000 (15:06 +0200)]
allow enabling features for deps with --features
Fixes #2851
bors [Thu, 14 Jul 2016 15:53:48 +0000 (08:53 -0700)]
Auto merge of #2873 - integer32llc:typo, r=alexcrichton
Fix typo in logging statement
Jake Goulding [Thu, 14 Jul 2016 12:56:24 +0000 (08:56 -0400)]
Fix typo in logging statement
bors [Thu, 14 Jul 2016 07:35:37 +0000 (00:35 -0700)]
Auto merge of #2858 - QuiltOS:parser-clean, r=alexcrichton
Parser clean
A few misc shortenings, mainly from my stdlib deps prototype. See the TODOs for some questions.
bors [Thu, 14 Jul 2016 06:54:09 +0000 (23:54 -0700)]
Auto merge of #2870 - matklad:add-host-triple, r=alexcrichton
Refactor `host/target_triple` handling
This PR adds an explicit `host_triple` filed to `BuildConfig`. It allows to unify host and target handling and to reduce the number of accesses to `config.rustc_info()`. As a side effect, the explicit `target_triple` field of `Context` is gone because it can now be calculated from the `BuildConfig`.
bors [Wed, 13 Jul 2016 18:36:44 +0000 (11:36 -0700)]
Auto merge of #2679 - sbeckeriv:alias, r=alexcrichton
Command alias or Alias command #1091
Dearest Reviewer,
This pull request closes #1091 which is a request to support aliases.
This is not as powerful as something like git's alias, however, I think
it sticks true to the original request.
I high jack the processing of the args. After a few flags are checked
and the args are parsed I check the config file for alias.COMMAND. If it
is there I split it like args does and replace args[1] (the original
command) with the alias command and its 'flags'.
As an extra measure I output the alias command with warn. I would be
willing to drop that or put it behind a verbose flag. Also the docs have
been updated.
Thanks!
Becker
<img width="784" alt="screen shot 2016-05-12 at 10 23 59 am" src="https://cloud.githubusercontent.com/assets/12170/
15226012/
d18a3336-1835-11e6-94c9-
875a63a79856.png">
Aleksey Kladov [Wed, 13 Jul 2016 16:38:10 +0000 (19:38 +0300)]
Add explicit host_triple to BuildConfig
bors [Wed, 13 Jul 2016 17:40:22 +0000 (10:40 -0700)]
Auto merge of #2867 - mattscamp:add_jobs_flag, r=alexcrichton
Add jobs flag to package
https://github.com/rust-lang/cargo/issues/2860
John Ericson [Wed, 13 Jul 2016 17:26:28 +0000 (10:26 -0700)]
Move private function near the one area it is used
John Ericson [Wed, 13 Jul 2016 17:28:05 +0000 (10:28 -0700)]
Cleanup conversion of TOML to `SourceId`
John Ericson [Wed, 13 Jul 2016 17:11:55 +0000 (10:11 -0700)]
Use flat_map to more concisely iterator through Options
Aleksey Kladov [Wed, 13 Jul 2016 16:20:47 +0000 (19:20 +0300)]
Introduce `Context::host_triple` method
Matthew Camp [Wed, 13 Jul 2016 08:38:22 +0000 (15:38 +0700)]
Add jobs flag to package
bors [Tue, 12 Jul 2016 19:53:21 +0000 (12:53 -0700)]
Auto merge of #2863 - QuiltOS:specified-req, r=alexcrichton
Make the `DependencyInner::specified_req` field a bool.
I could almost get rid if it completely, but then the dependency verifier would have to abort on, say, no version req specified or the any req. Crates.io indeed doesn't want wildcards, but other registries some day may have a different policy.
Making it a mere bool---since all the information it contained is on the `req` field anyways---was the next best thing.
John Ericson [Tue, 12 Jul 2016 16:55:02 +0000 (09:55 -0700)]
Make the `DependencyInner::specified_req` field a bool.
This field is hardly used. I could almost get rid if it completely, but
then the dependency verifier would have to abort on, say, no version req
specified or the any req. Crates.io indeed doesn't want such wildcards, but
other registries some day may have a different policy.
Making it a mere bool---since all the information it contained is in the
`req` field anyways---was the next best thing.
bors [Tue, 12 Jul 2016 16:53:17 +0000 (09:53 -0700)]
Auto merge of #2862 - alexcrichton:update-rust, r=alexcrichton
Update the rust nightly to build cargo nightlies
Right now Cargo doesn't work on OSX 10.12, but the fix is in upstream rustc, so
let's pick that up and make Cargo nightlies compatible as well.
Alex Crichton [Tue, 12 Jul 2016 16:41:50 +0000 (09:41 -0700)]
Update the rust nightly to build cargo nightlies
Right now Cargo doesn't work on OSX 10.12, but the fix is in upstream rustc, so
let's pick that up and make Cargo nightlies compatible as well.
John Ericson [Sat, 4 Jun 2016 00:48:54 +0000 (17:48 -0700)]
Tiny cleanup: functional update > mutation
bors [Mon, 11 Jul 2016 20:54:22 +0000 (13:54 -0700)]
Auto merge of #2853 - matklad:reduce-duplication, r=alexcrichton
Reduce duplication in `Context` creation
There was some duplicated code for `Context` creation in `cargo_clean` and `cargo_rustc`. I've tried to remove it by moving the common part into `Context::new`. Not sure that this is the right thing to do though, it's just something I came across while tracing `rustc_info` flow.
Additional possible refactoring would be to remove `Default` bound from `BuildConfig`.
bors [Mon, 11 Jul 2016 16:57:49 +0000 (09:57 -0700)]
Auto merge of #2852 - alexcrichton:doc-env-vars, r=alexcrichton
Document the RUSTC/RUSTDOC build script env vars
Alex Crichton [Mon, 11 Jul 2016 16:57:19 +0000 (09:57 -0700)]
Document the RUSTC/RUSTDOC build script env vars
Aleksey Kladov [Mon, 11 Jul 2016 16:27:39 +0000 (19:27 +0300)]
Reduce duplication in `Context` creation
bors [Sun, 10 Jul 2016 06:36:03 +0000 (23:36 -0700)]
Auto merge of #2830 - munyari:rustc-env, r=alexcrichton
Set environment variable for rustc in custom_build.rs
Addresses #2819
Panashe M. Fundira [Sat, 9 Jul 2016 17:19:30 +0000 (13:19 -0400)]
Assert that RUSTC and RUSTDOC are set correctly
bors [Sat, 9 Jul 2016 01:31:21 +0000 (18:31 -0700)]
Auto merge of #2842 - alx741:update_manpages, r=alexcrichton
Update manpages with new flags
Add the [new flags](http://blog.rust-lang.org/2016/07/07/Rust-1.10.html)
Daniel Campoverde [alx741] [Fri, 8 Jul 2016 20:28:35 +0000 (15:28 -0500)]
Man pages: add 'force' flag
Daniel Campoverde [alx741] [Fri, 8 Jul 2016 20:27:46 +0000 (15:27 -0500)]
Man pages: add 'doc' flag
Daniel Campoverde [alx741] [Fri, 8 Jul 2016 20:26:57 +0000 (15:26 -0500)]
Man pages: add 'explain' flag